Optimal. Leaf size=233 \[ -\frac {c \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 a^2 (c-d) f (1+\sin (e+f x))}-\frac {\cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f (a+a \sin (e+f x))^2}-\frac {c E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{3 a^2 (c-d) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {(c+d) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{3 a^2 f \sqrt {c+d \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.27, antiderivative size = 233, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2843, 3057,
2831, 2742, 2740, 2734, 2732} \begin {gather*} -\frac {c \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 a^2 f (c-d) (\sin (e+f x)+1)}+\frac {(c+d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{3 a^2 f \sqrt {c+d \sin (e+f x)}}-\frac {c \sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{3 a^2 f (c-d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {\cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f (a \sin (e+f x)+a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2843
Rule 3057
Rubi steps
\begin {align*} \int \frac {\sqrt {c+d \sin (e+f x)}}{(a+a \sin (e+f x))^2} \, dx &=-\frac {\cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f (a+a \sin (e+f x))^2}+\frac {\int \frac {\frac {1}{2} a (2 c+d)+\frac {1}{2} a d \sin (e+f x)}{(a+a \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{3 a^2}\\ &=-\frac {c \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 a^2 (c-d) f (1+\sin (e+f x))}-\frac {\cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f (a+a \sin (e+f x))^2}-\frac {\int \frac {\frac {a^2 d^2}{2}+\frac {1}{2} a^2 c d \sin (e+f x)}{\sqrt {c+d \sin (e+f x)}} \, dx}{3 a^4 (c-d)}\\ &=-\frac {c \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 a^2 (c-d) f (1+\sin (e+f x))}-\frac {\cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f (a+a \sin (e+f x))^2}-\frac {c \int \sqrt {c+d \sin (e+f x)} \, dx}{6 a^2 (c-d)}+\frac {(c+d) \int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{6 a^2}\\ &=-\frac {c \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 a^2 (c-d) f (1+\sin (e+f x))}-\frac {\cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f (a+a \sin (e+f x))^2}-\frac {\left (c \sqrt {c+d \sin (e+f x)}\right ) \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{6 a^2 (c-d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left ((c+d) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{6 a^2 \sqrt {c+d \sin (e+f x)}}\\ &=-\frac {c \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 a^2 (c-d) f (1+\sin (e+f x))}-\frac {\cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f (a+a \sin (e+f x))^2}-\frac {c E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{3 a^2 (c-d) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {(c+d) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{3 a^2 f \sqrt {c+d \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.69, size = 256, normalized size = 1.10 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^4 \left (-c (c+d \sin (e+f x))+\frac {\left (d \cos \left (\frac {1}{2} (e+f x)\right )-c \cos \left (\frac {3}{2} (e+f x)\right )+(3 c-d) \sin \left (\frac {1}{2} (e+f x)\right )\right ) (c+d \sin (e+f x))}{\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3}+c (c+d) E\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}-\left (c^2-d^2\right ) F\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right )}{3 a^2 (c-d) f (1+\sin (e+f x))^2 \sqrt {c+d \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(905\) vs.
\(2(279)=558\).
time = 19.84, size = 906, normalized size = 3.89
method | result | size |
default | \(\frac {\sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (\left (c -d \right ) \left (-\frac {\sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}{3 \left (c -d \right ) \left (1+\sin \left (f x +e \right )\right )^{2}}-\frac {\left (-\left (\sin ^{2}\left (f x +e \right )\right ) d -c \sin \left (f x +e \right )+d \sin \left (f x +e \right )+c \right ) \left (c -3 d \right )}{3 \left (c -d \right )^{2} \sqrt {\left (-d \sin \left (f x +e \right )-c \right ) \left (\sin \left (f x +e \right )-1\right ) \left (1+\sin \left (f x +e \right )\right )}}+\frac {2 d^{2} \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-1-\sin \left (f x +e \right )\right ) d}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )}{\left (3 c^{2}-6 c d +3 d^{2}\right ) \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}-\frac {d \left (c -3 d \right ) \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-1-\sin \left (f x +e \right )\right ) d}{c -d}}\, \left (\left (-\frac {c}{d}-1\right ) \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )+\EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )\right )}{3 \left (c -d \right )^{2} \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}\right )+d \left (-\frac {-\left (\sin ^{2}\left (f x +e \right )\right ) d -c \sin \left (f x +e \right )+d \sin \left (f x +e \right )+c}{\left (c -d \right ) \sqrt {\left (-d \sin \left (f x +e \right )-c \right ) \left (\sin \left (f x +e \right )-1\right ) \left (1+\sin \left (f x +e \right )\right )}}-\frac {2 d \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-1-\sin \left (f x +e \right )\right ) d}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )}{\left (2 c -2 d \right ) \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}-\frac {d \left (\frac {c}{d}-1\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {\frac {d \left (1-\sin \left (f x +e \right )\right )}{c +d}}\, \sqrt {\frac {\left (-1-\sin \left (f x +e \right )\right ) d}{c -d}}\, \left (\left (-\frac {c}{d}-1\right ) \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )+\EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right )\right )}{\left (c -d \right ) \sqrt {-\left (-d \sin \left (f x +e \right )-c \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}\right )\right )}{a^{2} \cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}\) | \(906\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.16, size = 913, normalized size = 3.92 \begin {gather*} \frac {{\left (\sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - \sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )} \cos \left (f x + e\right ) - {\left (\sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )} \cos \left (f x + e\right ) + 2 \, \sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )}\right )} \sin \left (f x + e\right ) - 2 \, \sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )}\right )} \sqrt {i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right ) + {\left (\sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - \sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )} \cos \left (f x + e\right ) - {\left (\sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )} \cos \left (f x + e\right ) + 2 \, \sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )}\right )} \sin \left (f x + e\right ) - 2 \, \sqrt {2} {\left (2 \, c^{2} - 3 \, d^{2}\right )}\right )} \sqrt {-i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right ) - 3 \, {\left (-i \, \sqrt {2} c d \cos \left (f x + e\right )^{2} + i \, \sqrt {2} c d \cos \left (f x + e\right ) + 2 i \, \sqrt {2} c d + {\left (i \, \sqrt {2} c d \cos \left (f x + e\right ) + 2 i \, \sqrt {2} c d\right )} \sin \left (f x + e\right )\right )} \sqrt {i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right )\right ) - 3 \, {\left (i \, \sqrt {2} c d \cos \left (f x + e\right )^{2} - i \, \sqrt {2} c d \cos \left (f x + e\right ) - 2 i \, \sqrt {2} c d + {\left (-i \, \sqrt {2} c d \cos \left (f x + e\right ) - 2 i \, \sqrt {2} c d\right )} \sin \left (f x + e\right )\right )} \sqrt {-i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right )\right ) + 6 \, {\left (c d \cos \left (f x + e\right )^{2} + c d - d^{2} + {\left (2 \, c d - d^{2}\right )} \cos \left (f x + e\right ) + {\left (c d \cos \left (f x + e\right ) - c d + d^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt {d \sin \left (f x + e\right ) + c}}{18 \, {\left ({\left (a^{2} c d - a^{2} d^{2}\right )} f \cos \left (f x + e\right )^{2} - {\left (a^{2} c d - a^{2} d^{2}\right )} f \cos \left (f x + e\right ) - 2 \, {\left (a^{2} c d - a^{2} d^{2}\right )} f - {\left ({\left (a^{2} c d - a^{2} d^{2}\right )} f \cos \left (f x + e\right ) + 2 \, {\left (a^{2} c d - a^{2} d^{2}\right )} f\right )} \sin \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sqrt {c + d \sin {\left (e + f x \right )}}}{\sin ^{2}{\left (e + f x \right )} + 2 \sin {\left (e + f x \right )} + 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {c+d\,\sin \left (e+f\,x\right )}}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________